#include<bits/stdc++.h>
using namespace std;

int n, r[100005], ans = 0, last = -1;
struct mons{
    int val, num;
}a[100005];
int tot = 0;

int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    ans = n;
    for(int i = 1; i <= n; i++)
        cin >> r[i];
    sort(r + 1, r + n + 1);
    for(int i = 1; i <= n; i++){
        if(last == r[i]){
            a[tot].num++;
        }
        else{
            a[++tot] = {r[i], 1};
        }
        last = r[i];
    }
    int rest = a[1].num;
    for(int i = 2; i <= tot; i++){
        int atk = a[i].num;
        if(atk >= rest){
            ans -= rest;
            rest = atk;
        }
        else{//atk < rest
            ans -= atk;
        }
    }
    cout << ans;
    return 0;
}
